
// 获取商品列表部分,调接口
var proArr = [];
let proListAPI = 'http://jx.xuzhixiang.top/ap/api/productlist.php';
// pagesize=20&pagenum=4
axios.get(proListAPI, { params: { uid: "120895", pagesize: 50 } }).then(r => {
    console.log(r);
    proArr = r.data.data;
    // console.log(proArr);
    var str = '';
    proArr.forEach(item => {
        str += `
            <div class="item">
             <a href="./itemPro.html?id=${item.pid}" target="_blank">
                <div class="itemimg">
                    <img src="${item.pimg}" alt="">
                    <div class="heart">
                        <img src="../images/prohart.png" alt="">
                    </div>
                    <div class="procar">
                        <img src="../images/goods-car.png" alt="">
                    </div>
                </div>
            </a>
                <div class="title">
                    <p class="dse">女装廓形西装外套</p>
                    <p class="pric">${item.pprice}</p>
                </div>
            </div>
            `;
    });
    var prolist = document.querySelector(".prolist");
    prolist.innerHTML = str;

    // 页面显示商品数量
    var len = proArr.length;
    // console.log(len);
    var numspan = document.querySelector(".numcon span");
    // console.log(numspan);
    numspan.innerText = len;
});


// 拿到load 引入部分

